<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>test this</title>
	<script>
		var num = 0;
		var obj = {
			num: 1,
			fn: function() {
				console.log("this.num", this.num, this);
			},
			init: function(){
				setTimeout(this.fn,0);
				document.querySelector("#btn-invoke").addEventListener("click",
					this.fn,false);
			}
		}

		window.onload = function(){
			obj.fn();
			obj.init();

			document.querySelector("#btn-invoke").onclick = function(){
				console.log("click",this);
			}
		}
	</script>
</head>
<body>
	<button id="btn-invoke">invoke</button>
</body>
</html>